package com.matrix.index.ui.home.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.matrix.basecore.constant.Constant
import com.matrix.basecore.utils.glide.GlideUtil
import com.matrix.index.R
import com.matrix.index.ui.home.bean.BingImage
import com.matrix.index.ui.home.bean.WallpaperBean

class RVBingAdapter(layoutResId: Int, dates: MutableList<BingImage.Images>) :
    BaseQuickAdapter<BingImage.Images, BaseViewHolder>(
        layoutResId, dates
    ), LoadMoreModule {

    override fun convert(holder: BaseViewHolder, item: BingImage.Images) {
        GlideUtil.loadImage(
            Constant.BingBaseUrl + item?.url,
            context,
            holder.getView(R.id.iv_cover),
            R.mipmap.icon_default_bg,
            false
        )
        holder.setText(R.id.tv_desc, item.copyright)
    }
}